<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <!-- 引入第三方Ajax库 -->
        <script src="./JS/axios.js"></script>
        <title>Document</title>
        <style>
            p {
                font-weight: bold;
                font-size: 22px;
                color: orangered;
            }
        </style>
    </head>
    <body>
        <h1>每天一句土味情话</h1>
        <p></p>
        <script>
            const p = document.querySelector("p");
            const url = `https://www.fastmock.site/mock/31dc2e7503f5174c39b0f67cd0d49eca/api/list`;
            axios
                .get(url)
                .then(function (response) {
                    p.innerHTML=response.data.data.content;
                })
                .catch(function (error) {
                    console.log(error);
                });
        </script>
    </body>
</html>
